const express = require('express');

const { getNotices, getWarns } = require('../src/mock/test/testjson');

const router = express.Router();

/* GET home page. */
router.get('/testjson/:type', (req, res) => {
  let result = {};
  if (req.params.type === 'notices') {
    result = getNotices(req);
  } else if (req.params.type === 'warns') {
    result = getWarns(req);
  }
  res.json(result);
});

module.exports = router;
